package domain.entities;

import javax.persistence.*;
import java.util.Collections;
import java.util.Date;
import java.util.LinkedHashMap;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Printedmaterialforpatient entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "printedmaterialforpatient", catalog = "bms")
public class Printedmaterialforpatient implements java.io.Serializable {

	// Fields

	private Integer id;
	private ProtocoloCentro protocoloCentro;
	private Date approvalExternalEc;
	private Date approvalLocalEc;
	private Date approvalTc;
	private Date cartaNoVotoEc;
	private Date cartaNoVotoTc;
	private Date copiaSelladaComite;
	private Date dated;
	private String description;
	private Date sentToExternalEc;
	private Date sentToLocalEc;
	private Date sentToSite;
	private Date sentToTc;
    private Integer scope;

    public static final String CLASSTITLE = "Printed Material for Patients";
    public static final LinkedHashMap<String, String> TITULOS = new LinkedHashMap<String, String>(
            Collections.unmodifiableMap(
                    new LinkedHashMap<String, String>() {
                        {
                            put("description", "Description");
                            put("dated", "Dated");
                            put("sentToSite", "Sent to Site");
                            put("sentToExternalEc", "Sent to External EC");
                            put("approvedExternalEc", "Approved/Notified External EC");
                            put("sentToLocalEc", "Sent to Local EC");
                            put("approvedLocalEc", "Approved/Notified Local EC");
                            put("cartaNoVotoLocalEc", "Not vote statement");
                            put("sentToTc", "Sent to Teaching Committee");
                            put("approvedTc", "Approved/Notified Teaching Committee");
                            put("cartaNoVotoTc", "Not vote statement");
                            put("copiaSelladaComite", "Date of Receipt of the Stamped Copy (by EC)");
                        }
                    }
            )
    );


    // Constructors

	/** default constructor */
	public Printedmaterialforpatient() {
	}

	/** minimal constructor */
	public Printedmaterialforpatient(ProtocoloCentro protocoloCentro) {
		this.protocoloCentro = protocoloCentro;
	}

	/** full constructor */
	public Printedmaterialforpatient(ProtocoloCentro protocoloCentro,
			Date approvalExternalEc, Date approvalLocalEc, Date approvalTc,
			Date cartaNoVotoEc, Date cartaNoVotoTc, Date copiaSelladaComite,
			Date dated, String description, Date sentToExternalEc,
			Date sentToLocalEc, Date sentToSite, Date sentToTc) {
		this.protocoloCentro = protocoloCentro;
		this.approvalExternalEc = approvalExternalEc;
		this.approvalLocalEc = approvalLocalEc;
		this.approvalTc = approvalTc;
		this.cartaNoVotoEc = cartaNoVotoEc;
		this.cartaNoVotoTc = cartaNoVotoTc;
		this.copiaSelladaComite = copiaSelladaComite;
		this.dated = dated;
		this.description = description;
		this.sentToExternalEc = sentToExternalEc;
		this.sentToLocalEc = sentToLocalEc;
		this.sentToSite = sentToSite;
		this.sentToTc = sentToTc;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "PROTOCOLO_CENTROCENTROid", referencedColumnName = "CENTROid", nullable = false),
			@JoinColumn(name = "protocolo_centroprotocolo_compromisopaisprotocoloid", referencedColumnName = "protocolo_compromisopaisprotocoloid", nullable = false),
			@JoinColumn(name = "protocolo_centroprotocolo_compromisopaiscompromisopaisid", referencedColumnName = "protocolo_compromisopaiscompromisopaisid", nullable = false) })
	public ProtocoloCentro getProtocoloCentro() {
		return this.protocoloCentro;
	}

	public void setProtocoloCentro(ProtocoloCentro protocoloCentro) {
		this.protocoloCentro = protocoloCentro;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "approvalCentralEC", length = 10)
	public Date getApprovalExternalEc() {
		return this.approvalExternalEc;
	}

	public void setApprovalExternalEc(Date approvalExternalEc) {
		this.approvalExternalEc = approvalExternalEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "approvalLocalEC", length = 10)
	public Date getApprovalLocalEc() {
		return this.approvalLocalEc;
	}

	public void setApprovalLocalEc(Date approvalLocalEc) {
		this.approvalLocalEc = approvalLocalEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "approvalTC", length = 10)
	public Date getApprovalTc() {
		return this.approvalTc;
	}

	public void setApprovalTc(Date approvalTc) {
		this.approvalTc = approvalTc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "cartaNoVotoEC", length = 10)
	public Date getCartaNoVotoEc() {
		return this.cartaNoVotoEc;
	}

	public void setCartaNoVotoEc(Date cartaNoVotoEc) {
		this.cartaNoVotoEc = cartaNoVotoEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "cartaNoVotoTC", length = 10)
	public Date getCartaNoVotoTc() {
		return this.cartaNoVotoTc;
	}

	public void setCartaNoVotoTc(Date cartaNoVotoTc) {
		this.cartaNoVotoTc = cartaNoVotoTc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "copiaSelladaComite", length = 10)
	public Date getCopiaSelladaComite() {
		return this.copiaSelladaComite;
	}

	public void setCopiaSelladaComite(Date copiaSelladaComite) {
		this.copiaSelladaComite = copiaSelladaComite;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "dated", length = 10)
	public Date getDated() {
		return this.dated;
	}

	public void setDated(Date dated) {
		this.dated = dated;
	}

	@Column(name = "description")
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "sentToCentralEC", length = 10)
	public Date getSentToExternalEc() {
		return this.sentToExternalEc;
	}

	public void setSentToExternalEc(Date sentToExternalEc) {
		this.sentToExternalEc = sentToExternalEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "sentToLocalEC", length = 10)
	public Date getSentToLocalEc() {
		return this.sentToLocalEc;
	}

	public void setSentToLocalEc(Date sentToLocalEc) {
		this.sentToLocalEc = sentToLocalEc;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "sentToSite", length = 10)
	public Date getSentToSite() {
		return this.sentToSite;
	}

	public void setSentToSite(Date sentToSite) {
		this.sentToSite = sentToSite;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "sentToTC", length = 10)
	public Date getSentToTc() {
		return this.sentToTc;
	}

	public void setSentToTc(Date sentToTc) {
		this.sentToTc = sentToTc;
	}

    @Column(name = "scope")
    public Integer getScope() {
        return scope;
    }

    public void setScope(Integer scope) {
        this.scope = scope;
    }
}